import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvFileSource;

import static org.junit.jupiter.api.Assertions.assertEquals;

class TriangleTest2 {
    /**
     *一般边界值方法
     */
    @ParameterizedTest
    @CsvFileSource(resources = "/triangle1.csv")
    void test_csv_file_source_GeneralBoundary(int a, int b, int c, String expected) {
        assertEquals(expected, Triangle.classify(a,b,c));
    }
    /**
     *健壮性边界值方法
     */
    @ParameterizedTest
    @CsvFileSource(resources = "/triangle2.csv")
    void test_csv_file_source_RobustBoundary(int a, int b, int c, String expected) {
        assertEquals(expected, Triangle.classify(a,b,c));
    }
    /**
     *最坏情况一般边界值分析方法
     */
    @ParameterizedTest
    @CsvFileSource(resources = "/triangle3.csv")
    void test_csv_file_source_WorstCaseGeneralBoundary(int a, int b, int c, String expected) {
        assertEquals(expected, Triangle.classify(a,b,c));
    }
    /**
     *最坏情况健壮性边界值分析方法
     */
    @ParameterizedTest
    @CsvFileSource(resources = "/triangle4.csv")
    void test_csv_file_source_WorstCaseRobustBoundary(int a, int b, int c, String expected) {
        assertEquals(expected, Triangle.classify(a,b,c));
    }


}
